home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 July
/
1986-07.d64
/
math worksheet
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
62 lines
10 rem ** math worksheet **
20 poke 53280,0:poke 53281,0:goto 50
30 rem ** position cursor **
40 poke 781,r:poke 782,c:poke 783,0:sys 65520:return
50 print"[147]":f$="worksheet":c=8
60 r=2:gosub 40:print"s[158][146]ubtraction "f$
70 r=4:gosub 40:print"a[158][146]ddition "f$
80 r=6:gosub 40:print"m[158][146]ultiplication "f$
90 print" press highlighted key[158][146] of your choice
100 [161] k$:[139] k$[178]"s" [167] s$[178]"-":[137] 150
110 [139] k$[178]"a" [167] s$[178]"+":[137] 150
120 [139] k$[178]"m" [167] s$[178]"x":[137] 150
130 [137] 100
150 [134] a$(100),p%(100):cr$[178][199](13):j[178]0:z[178]0
170 [153]"load"[166]13)" math worksheet "
180 r[178]2:c[178]12:[141] 40:[153]" creating problems sys"
190 [143] ** create 100 strings a$(0)-a$(99) **
200 [129] i[178]0 [164] 9:n$(i)[178][201]([196](i),1):[130] i
210 i[178]0
220 [129] k[178]0 [164] 9:[129] l[178]0 [164] 9
240 [139] s$[178]"-" [175] [197](n$(k)) [179] [197](n$(l)) [167] a$(i)[178]n$(l)[170]n$(k):[137] 260
250 a$(i) [178] n$(k)[170]n$(l)
260 [153]" "a$(i)" ";:i[178]i[170]1:[130] l,k
300 r[178]2:c[178]11:[141] 40:[153]" randomize problems "
330 [139] j[177]99 [167] 490
340 x[178][181]([187](0)[172]99):[139] j[178]0 [167] p%(j)[178]x:[141] 470:j[178]j[170]1:[137] 340
360 i[178]0
370 [139] p%(i)[178]x [167] 420
380 i[178]i[170]1
390 [139] i[178]j [167] p%(j)[178]x:[141] 470:j[178]j[170]1:[137] 330
400 [137] 370
410 [143] ** find unused pointer **
420 i[178]0
430 [139] p%(i)[178]z [167] z[178]z[170]1:[137] 420
440 i[178]i[170]1
450 [139] i[178]j [167] p%(j)[178]z:[141] 470:j[178]j[170]1:[137] 330
460 [137] 430
470 [153]" "a$(p%(j))" ";:[142]
480 [143] ** print worksheet **
490 r[178]16:c[178]3:[141] 40:[153]"sysposition printhead about 1/4 inch"
500 r[178]17:c[178]8:[141] 40:[153]"below paper perforation."
510 r[178]18:c[178]3:[141] 40:[153]"press & hold qwaitsys to abort printing"
520 r[178]20:c[178]8:[141] 40:[153]"press any keysyswait to start "
530 [161] k$:[139] k$[178]"" [167] 530
540 [159] 4,4
550 [152]4,[199](14)
560 [152]4," math worksheet":[152]4,:[152]4,
570 [152]4,"nametotototototototototototototototototototototototototototototo":[152]4,
580 [129] i[178]0 [164] 90 [169] 10
590 [129] j[178]i [164] 9[170]i:[152]4," ";[200](a$(p%(j)),1)" ";:[130] j:[152]4,cr$;
600 [129] j[178]i [164] 9[170]i:[152]4," "s$;[201](a$(p%(j)),1)" ";:[130] j:[152]4,cr$;
610 [129] j[178]i [164] 9[170]i:[152]4," tab( ";:[130] j
620 [129] l[178]1 [164] 4:[152]4,:[130] l
630 [161] k$:[139] k$[178]"q" [167] [156]:[137] 50
640 [130] i
650 [160] 4
660 r[178]20:c[178]5:[141] 40:[153]"press r waitsys to do another worksheet"
670 r[178]21:c[178]5:[141] 40:[153]"press q waitsys to quit
680 get k$:if k$="r" then clr:goto 50
690 if k$="q" then end
700 goto 680